public class ArrayDemo {

    public static void main(String[] args) {
        int[] a = {1,2,3,3,2,1};
        int[] a1 = new int[a.length];
        int cont =0;
        for (int i = 0; i < a.length; i++) {
            int cont1 = 0;
            for (int j = 0; j < a1.length; j++) {
                if (a[i]==a1[j]){
                    cont1++;
                }
            }
            if (cont1==0){
                a1[cont++] = a[i];
            }

        }

        for (int i = 0; i < cont; i++) {
            System.out.println(a1[i]);
        }

    }
}
